Refactor some code about activation (issue #49 & #10)
Remove unused code
Prioritize warnings