Remove global namespace, more formal header, fix tabs