:lipstick: Refactor core functionality

:memo: Wrote documentation using biscotto for classes and functions.
:white_check_mark: Now using jasmine-node for testing as jest was too unstable.
Tests cover more code now.