Combined all three files

To more easily weed out more redundant code
Removed duplicate code
Deleted old versions of merged code