Fixes and prepping some useful functionality