If you are planning to buy a home anytime soon, you'll most likely need to apply for a mortgage. Unfortunately, mortgages can be tougher to get these days than many people think.

Credit standards have relaxed a bit, but are still high on a historic basis. For example, the average FICO score for an approved conventional mortgage is 755, and the average score of those applicants who get denied is 724, which is considered to be a very good credit score.

So, why are the banks denying mortgages to people with very good credit? And, on the other hand, how do some people with FICO scores as low as 620 successfully obtain conventional mortgage financing?

In short, there are several other factors the banks look at, such as how much debt you have, how solid your employment history is, and any "red flags" on your credit report. Here are some things you need to be aware of, both before you apply and during the application process, that can help you make obtaining a mortgage as smooth and painless as possible.

1.) Start paying down your credit cards
It's completely possible to have an excellent credit score, even with a maxed-out credit card, but it makes mortgage lenders nervous.

Any credit line that you are using a high percentage of can be a big red flag when applying for a mortgage. If you are considering buying a house anytime soon, aim for getting all of your credit cards paid down to under one-fourth of your available credit.

Plus, the lower your debt, the lower your monthly payment obligation is going to be, and that's what determines how much you can borrow

2.) Your employment history plays a big role
While there may not be that much you can do about this, it is certainly worth noting how important it is in the approval process.

At the very least, most lenders want to see two years at your current job. In other words, if you recently started a new job, you might be alright if you have a stable employment history as long as there have been no major gaps in employment, and the work was in the same field you are currently in.

3.) Don't close out old credit lines
This is true before and during the application process. Before the process, closing an unwanted credit line reduces your total available credit, and therefore raises the percentage of your available credit you're actually using.

According to myFICO.com, whose scores are used by the majority of lenders, 30% of your credit score comes from your balances relative to your available credit. So, that $500 "starter card" you opened when you were 18 but no longer use actually makes you look better to lenders.

And, don't close out any accounts between the time when you submit your application and when you close the loan. Your lender will check your credit again before the closing date, and any "surprises" like a missing account can cause the need for more documentation and extensive delays.

4.) Don't apply for any new credit!
10% of your FICO score comes from "new credit", which refers to new accounts and credit inquiries. While a single inquiry or two will not necessarily drop your score by more than a point or two, your lender will want documentation of any recent inquiries, including a through explanation of any new credit accounts resulting from them.

5.) Keep solid records of any "unusual" deposits
Did you deposit any large amounts of money into your bank accounts recently? If so, be prepared to document it.

Banks need to know where all of your money is coming from. If a large deposit was a gift, whoever gave you the gift will have to sign a form, and possibly provide copies of their own bank statements to prove the money actually came from who you say it did.

Public domain

It may seem silly and tedious, but a large sum of cash deposited into your account can cause the rejection of your loan if you can't adequately prove where it came from, especially if you plan to use it as part of your down payment.

Common themes
To sum it up, don't do anything that could potentially affect your credit report, even in a positive way. Any surprises could greatly delay your loan's closing, or even lead to a denial.

And, make sure you can document everything about your financial life over the past two years. This is especially true for anything that could be classified as "unusual" activity.

As long as you don't surprise your loan processor too much, and provide any documentation in a timely manner, the mortgage process could be more painless than you think.