Started to refactor the API.java. 3 tests does not pass, but will fix them tomorrow. All of the failed tasks are connected to set-route
All of the test now pass, but still could do some refactoring. Atleast the program flow is easier to control now.
Implemented cache and made all of the fields now handeled by cache package private