Making things more flexible

Just thought I would submit my changes back to you, just in case any one still uses this :)