Adding MVC architecture, and organizing the code more and adding some docs string.

Fixed