Bug Fixes

Some bug fixes and build button now resets the memory first