Moved code to proper place and fixed another naming convention