Huge cleanup

* Changed `i8` integer declaration to the more obvious `long`
* Simplified the grossly overcomplicated solution to Problem 1
* Removed redundant and unused functions