Cleaned up code, renamed a method