refactor toolbar code;
proper positioning on edges;
todo comment;