Cleaned up code by making private helper methods.