small type fix and cleanup