Added testing functionality, finished assignment