Moved requires to the top of the code and turned them into 'require_once'