Add basic K2 storage framework implementation.

Due to the size of the commit, I'm submitting the unit tests in a separate request.
nice, I had never thought to put default at the top of switch. Makes perfect sense.