Reader function not exported properly (typo) and cleaned up code a little.