Updated RPATH macro.

Cleaned up the code