separated gui and logic, added cli
fixed newlines and errors