Move all callbacks to native js for slight performance increase