Got tests working, some new functions
Adding and fixing unit tests