Code Refactoring

A whole overhaul in the project, coded explained, refactored, and
fixed. In addition a couple of effects have been added.