fix const warning

local is duplicated on heap
better variable names
fix unsigned/signed comparisions
cosmetic
using stack only
shortopts
Merge branch 'misc'
support for packed files.
Merge branch 'pak'