fixes so deploying fully on tomcat server
some clean up to use flash error and info