Rectified some stuff

Added tests for window, at least for some parts.