Added pragma mark, removed unused c function, and made variables static