Better function names, more documentation, cleaner output