Refactoring; removing obsolete code.