Changed everything to callbacks