added active class + code cleanup