Added more tests. Finished functionality. Could use refactoring and debugging later on.