Removed unnecessary and obsolete code