Removed unused search form
Some refactoring
Made viewer mode and editor mode