Significant cleanup and fix for empty first field; closes #4.