Some changes for easier plugin developement

Changes LMS to be more flexible. Allows plugins to interact with LMS and SMARTY objects. Allows plugins to have their own modules directories.