Moved some stuff to functions,
added "fill" tool