In the tools module is all the logic. The other modules like Server and GUI are just wrappers around the tools module for easier interaction.
For API documentation see Tools.
Tools