Removed hard coded directory paths

- Removed references to core directory.
- Switch some references to tools directory
- Added preferences variables where appropriate