minor refactoring of whitespace
types and specs for public functions