devcode backup

fixed some things; other things are still broken or need refactored