Added ability to replace default models, moved api calls to separarate module, added backend fucntionality