fixed something here and there,removed unused parts

Signed-off-by: overblued <ace.jby@gmail.com>