Added spec docs and modified a bit of source.