added ship class, improved serial functionality