Convert raptor to java.util.Optional

Optimize imports so they are in the right order