code view and bug fixes