clean up code in listings controller