Move classes used in API to api directory