Add formatting, refine functionality