Implemneted support for dynamic prefixes (issue #3)

Here is the proposed change for #3 with source code reformatted to match the original style.