fixed coding style issues and removed some useless code and files