added clear view methods, inlining, refactoring