Initial version of code.
First working version with most functionalities. Need to organize better, write test cases.