Move API classes into own package