If you know that you will be moving in 3 to 5 years, you might want to consider refinancing to a 3 or 5 year ARM (adjustable rate mortgage). These loans typically have a much lower rate that a traditional fixed rate loan such as a 30 year fixed, but they do have a fixed rate for the first 3 or 5 years of the loan. This will enable you to benefit from the lower rate, but you won't ever have to worry about the risk of a rate adjustment because you will be selling the home before the fixed-rate period ends.
When lenders offer a "no-cost" loan, they may include a prepayment penalty to discourage you from refinancing within the first few years of the loan. Ask the lender offering a no-cost loan to explain all the fees and penalties before you agree to these terms.
If you have bad credit, find a lender who is willing to work with you and offer you reasonable loan terms.
Lenders like pristine credit reports. If you have a bunch of open credit card accounts that you never use (and who doesn't?), consider closing them. It will boost your credit score and make you a much more attractive borrower to a lender. Then, a month after you've closed your accounts, go over your credit report with a fine-tooth comb. It should read that the accounts were closed at your request. (You don't want lenders to think someone cut you off and that you're a bad credit risk.)