Modal additions and bug fixes