added finish button
housekeeping, comments and formatting