Final submit

Fixed bugs.