More cleanup + Added helper functions