Code cleanup and updated examples structure

- Updated validateKey() regex