Fixed window resizing and positioning delays. Added comments.