Move ajax-loader next to machine state

when creating machine