Fixed some bugs in metrics module
Solved #1
Solved #2
Solved #3
Solved #5
Solved #7
Solved #14
Solved #8
Solved #9
Solved #10
Solved #11
Solved #13
Minor changes on interface