Updated .gitignore and refactored some modules.