code and ui improvements