Restructure into seperate files