better performance

check number before touching file system
better whitespace & comments
add parent data to single template
[PERFORMANCE] add single filter
correct identing