refactored and made reading a bit saner, writing is now optional, updated readme