1) avoid soaps and detergents in bottle cleaning. Use something like PBW or oxyclean free. It kills he beer head.
2) mold I conquer by shaking a small amount of scalding water in the bottle. Then use a bottle brush to help. This still won't help get all the mold so I soak in buckets with oxyclean free for a say (this also helps remove labels and glue).
3) then I wash in the dishwasher (no soap, also no jet dry!) and sanitize with the heat cycle.
In the future, much of these steps won't be necessary...a quick clean with oxyclean and sanitize with star San.
In the future, to help with mold, wash your bottles immediately after pouring. Takes 10 seconds and saves a lot of time in the longrun.