Cleaned some stuff.

typedef moved up & removed using namespace std