* rewrite nav logics and rename main to top.