Fixed some layout issues; Cleaned code