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

yeah that's just a code I dumped there when I started developing I will remove it right away.