begin enforcing more strong typing
fix some return type & intrinsic typing