Beautify the Golang code
1. bug fixs, 2. UI improvements