Refactored info window functions and removed some bugs