Clean up code spacing/line breaks, add todos, add debug api endpoint on first load