Implement lacking parts

* Implement link transition
* Fix DB bug
* Refactor