minor changes: created new directives to handle location change and added a few fixes