add the put and size functions.
fix some general build issues so it works in more places.