Moved methods to private and added whitelist.