Fixed errors: Added redirect. flash.keep. cleaned code.