Cleaned up Flash code and added post save tests