Final cleanup of first working version