reverted local patches

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
cleanup coding style a little

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>