First runnable version

Was able to pass unittests, was first time to write
javascript unittests. Great way of debugging and testing
together.

This commit message is like a diary lol.