Refactoring

Added comments. Removed fifth line from test because it was unnecessary
since the final line could be used instead.