Refactored a bunch, updated php styling, updated error handling, updated account updating