fixed
removed trailing spaces
add bugs and todos