Support for gym management

This pull request adds support for gym management.