Small changes. Removed mod-manipulation functions.