Feature/remove globals

This one's ready to go