All cleanup and bug fixes