code tidy up, removed explicit declarations