Fix scala build warning and cleanup packages