Minor fixes, bump to 0.3.1