removed dead code

logged in is already covered by Auth
code formatting
inlined function
code formatting
moves prepare answer from entries controller to entry model
moved edit logic from entries controller to entry model
fixes #148 encoding in [code] block not working