preparations to simplify multiple api support

move api-related files into separate directory, namespace