Render refactor (with couple of fixes)

It's preferable to use spaces for formatting like here, otherwise it ends up looking strange when a tab is defined differently than in FD (like here on GitHub).