Thread mvc files. Fixed few bugs.