Added all functionality. Starting to test.