add -feature scala compiler and fix warnings