changes to main and window classes