Removed some unused code, also further cleanup.

Signed-off-by: revelator <ralphengels@gmail.com>