committed some leftover changes, and removed unused code
added test