Revert "made vector2 a templated class"

This reverts commit 204e3b000ae28641527b4c9c96c2ca750e026a04.
refactored code