Converted to MVC, modal fixed and other stuff!