documentation
remove the useless hashmap
remove the useless hashmap.

Try to secure the code a bit more
remove some bugs.