Formatted almost everything. Need to refine more