support for preparedStatements done.

Lots of updates, prolly breaks stuff totally, sorry!