tested, most problems fixed

Signed-off-by: Mishel J <misheljohns@gmail.com>