Added license to source files and moved the ui code