Homepage controller now builds input.json from database