refactored hardcoded scaffold_dir to a scaffold model method scaffold#data_dir
ported trackball unpacking to ruby