Changing success & error callbacks to seperate fns

This is much cleaner solution rather than having one function print
stuff, also easier to extend and modify in the future