Remove librocket trap calls and replace them with direct calls to the library