fixed some warnings, started changing return semantics