moved focus directive to separate file (and minor other fixes)