Eliminated unnecessary objects and optimized code

- No need for all the different classes, so removed.
- Made pieces cleaner.
- Fixed variable names.