remove unused functions + fix comments
add some copyright notices.