fix issue #1215 lang collection in metas is missing for controller
add functional tests mojits
add functional tests
minor format updates
add unit tests
update files basing on review feedback
change the way to detect requirement of lang module
using array.indexOf to locate a string
update HISTORY file
add comments and rm redundant code
simplify code
optimize token replacement