Steps for fixing #150
Removed dead code
Towards fixing #101
Rewrite for #101
Removed dead code
Cleaned header