Fixed some errors with forgetting to unwrap optionals.
Added test classes and started work on unit tests.