Fixed warnings (unnecessary type arguments)
Minor changes to SpaceTest (for compatibility with Java 8 version);
added trim functions