Some fixing up on main app