Improve the goto method

- Return an error if no calendar was specified
- Simplify the code and remove redundancy
Add tests for the goto method