started creating APIFactory
Revert "started creating APIFactory"

This reverts commit 4588c1f49fe4967b30e8ac1f540f8b7df2f34709.
added api factory
more api factory stuff