Separate methods to smaller. Separate Emspost class. Add comments