Cleaned up code enough for now