Some bugs fixed, interface improved