fixing some of the last commit's stuff, and preparig for gui