Refactored current files and added a few new ones.