Move members below methods
Use C++11 prev/next
Use class instead of typename for templates