fixed some errors, updated some GUI code