Used TABLE constants in SELECT queries, removed else in registration model and fixed indentions