Code reformatting, improve toolbar