physics: abstract collision code to Shapes; minor fixes to velocity calculations\ncode: convert more code to Scala