improvements from linaro and more

See bitbucket account for more info

Signed-off-by: dragon <dragon7780@hotmail.nl>