Cleaned up code and started to use PromiseKit