Renamed formatter to FormatHandler and fixed some small bugs