fixing viewports and clean angular code