added active state to links #49
refactored code for resources #49