Move Post Function out of main View Controller