Porting from Java

Porting Java-like code, removeing unnecessary old Java code.