some fixes
some refactoring
some refactoring
more refactoring
use erlang:make_ref() instead of now()
more refactoring
remove un-used func
don't use doc_root
small refactoring