Fixed many bugs, testing formatting