Cleaned up shared.router and commented heavily