Removed extra endif
Removed extra endif

Also reduced nesting of statements a bit so it's easier to keep
track of.

frodenas/tile-generator,alex-slynko/tile-generator,cf-platform-eng/tile-generator,cf-platform-eng/tile-generator,alex-slynko/tile-generator,alex-slynko/tile-generator,cf-platform-eng/tile-generator,frodenas/tile-generator,alex-slynko/tile-generator,cf-platform-eng/tile-generator