Cleaned-up code for pre-release