ajax handler clean up
formatting