Code formatting and improved docblocks