Cleanup and further preparations for user layer and cleanup.