Some cleanups

Removed useless prototype and renamed object typecast functions
declaration macro.