Cleaned up code
Added menu to add rules view.