Numerous bug fixes, preparing for initial release