Cleaned code, dealt with html warnings