Reformatted code
Added selling and buying