Minor issue: The indention is erratic in here, possibly the generator is inserting tabs.