Renamed files and refactored code into a somewhat better structure.