Added comments and moved methods.