Update readme formatting and minor function placement