Made a bunch of functions inline.