Commented the class thoroughly to explain what each bit does; style conformity