Implemented some helper methods.