Final changes to secure code