Fixing main problems after issues with Jframs