Some convenience functions. Still pretty messed up