General changes and cleanup