 (ns clojush.instructions.vectors
   (:use [clojush pushstate globals]
         clojush.instructions.common))
-;      [clojure.string :only [split trim]])
-;(:require [clojure.string :as string]))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; stack instructions for vectors
 
-(define-registered vector_integer_pop (popper :vector_integer))
-(define-registered vector_float_pop (popper :vector_float))
-(define-registered vector_boolean_pop (popper :vector_boolean))
-(define-registered vector_string_pop (popper :vector_string))
-
-(define-registered vector_integer_dup (duper :vector_integer))
-(define-registered vector_float_dup (duper :vector_float))
-(define-registered vector_boolean_dup (duper :vector_boolean))
-(define-registered vector_string_dup (duper :vector_string))
-
-(define-registered vector_integer_swap (swapper :vector_integer))
-(define-registered vector_float_swap (swapper :vector_float))
-(define-registered vector_boolean_swap (swapper :vector_boolean))
-(define-registered vector_string_swap (swapper :vector_string))
-
-(define-registered vector_integer_rot (rotter :vector_integer))
-(define-registered vector_float_rot (rotter :vector_float))
-(define-registered vector_boolean_rot (rotter :vector_boolean))
-(define-registered vector_string_rot (rotter :vector_string))
-
-(define-registered vector_integer_flush (flusher :vector_integer))
-(define-registered vector_float_flush (flusher :vector_float))
-(define-registered vector_boolean_flush (flusher :vector_boolean))
-(define-registered vector_string_flush (flusher :vector_string))
-
-(define-registered vector_integer_eq (eqer :vector_integer))
-(define-registered vector_float_eq (eqer :vector_float))
-(define-registered vector_boolean_eq (eqer :vector_boolean))
-(define-registered vector_string_eq (eqer :vector_string))
-
-(define-registered vector_integer_stackdepth (stackdepther :vector_integer))
-(define-registered vector_float_stackdepth (stackdepther :vector_float))
-(define-registered vector_boolean_stackdepth (stackdepther :vector_boolean))
-(define-registered vector_string_stackdepth (stackdepther :vector_string))
-
-(define-registered vector_integer_yank (yanker :vector_integer))
-(define-registered vector_float_yank (yanker :vector_float))
-(define-registered vector_boolean_yank (yanker :vector_boolean))
-(define-registered vector_string_yank (yanker :vector_string))
-
-(define-registered vector_integer_yankdup (yankduper :vector_integer))
-(define-registered vector_float_yankdup (yankduper :vector_float))
-(define-registered vector_boolean_yankdup (yankduper :vector_boolean))
-(define-registered vector_string_yankdup (yankduper :vector_string))
-
-(define-registered vector_integer_shove (shover :vector_integer))
-(define-registered vector_float_shove (shover :vector_float))
-(define-registered vector_boolean_shove (shover :vector_boolean))
-(define-registered vector_string_shove (shover :vector_string))
-
-(define-registered vector_integer_empty (emptyer :vector_integer))
-(define-registered vector_float_empty (emptyer :vector_float))
-(define-registered vector_boolean_empty (emptyer :vector_boolean))
-(define-registered vector_string_empty (emptyer :vector_string))
+(define-registered vector_integer_pop (with-meta (popper :vector_integer) {:stack-types [:vector_integer]}))
+(define-registered vector_float_pop (with-meta (popper :vector_float) {:stack-types [:vector_float]}))
+(define-registered vector_boolean_pop (with-meta (popper :vector_boolean) {:stack-types [:vector_boolean]}))
+(define-registered vector_string_pop (with-meta (popper :vector_string) {:stack-types [:vector_string]}))
+
+(define-registered vector_integer_dup (with-meta (duper :vector_integer) {:stack-types [:vector_integer]}))
+(define-registered vector_float_dup (with-meta (duper :vector_float) {:stack-types [:vector_float]}))
+(define-registered vector_boolean_dup (with-meta (duper :vector_boolean) {:stack-types [:vector_boolean]}))
+(define-registered vector_string_dup (with-meta (duper :vector_string) {:stack-types [:vector_string]}))
+
+(define-registered vector_integer_swap (with-meta (swapper :vector_integer) {:stack-types [:vector_integer]}))
+(define-registered vector_float_swap (with-meta (swapper :vector_float) {:stack-types [:vector_float]}))
+(define-registered vector_boolean_swap (with-meta (swapper :vector_boolean) {:stack-types [:vector_boolean]}))
+(define-registered vector_string_swap (with-meta (swapper :vector_string) {:stack-types [:vector_string]}))
+
+(define-registered vector_integer_rot (with-meta (rotter :vector_integer) {:stack-types [:vector_integer]}))
+(define-registered vector_float_rot (with-meta (rotter :vector_float) {:stack-types [:vector_float]}))
+(define-registered vector_boolean_rot (with-meta (rotter :vector_boolean) {:stack-types [:vector_boolean]}))
+(define-registered vector_string_rot (with-meta (rotter :vector_string) {:stack-types [:vector_string]}))
+
+(define-registered vector_integer_flush (with-meta (flusher :vector_integer) {:stack-types [:vector_integer]}))
+(define-registered vector_float_flush (with-meta (flusher :vector_float) {:stack-types [:vector_float]}))
+(define-registered vector_boolean_flush (with-meta (flusher :vector_boolean) {:stack-types [:vector_boolean]}))
+(define-registered vector_string_flush (with-meta (flusher :vector_string) {:stack-types [:vector_string]}))
+
+(define-registered vector_integer_eq (with-meta (eqer :vector_integer) {:stack-types [:vector_integer :boolean]}))
+(define-registered vector_float_eq (with-meta (eqer :vector_float) {:stack-types [:vector_float :boolean]}))
+(define-registered vector_boolean_eq (with-meta (eqer :vector_boolean) {:stack-types [:vector_boolean :boolean]}))
+(define-registered vector_string_eq (with-meta (eqer :vector_string) {:stack-types [:vector_string :boolean]}))
+
+(define-registered vector_integer_stackdepth (with-meta (stackdepther :vector_integer) {:stack-types [:vector_integer :integer]}))
+(define-registered vector_float_stackdepth (with-meta (stackdepther :vector_float) {:stack-types [:vector_float :integer]}))
+(define-registered vector_boolean_stackdepth (with-meta (stackdepther :vector_boolean) {:stack-types [:vector_boolean :integer]}))
+(define-registered vector_string_stackdepth (with-meta (stackdepther :vector_string) {:stack-types [:vector_string :integer]}))
+
+(define-registered vector_integer_yank (with-meta (yanker :vector_integer) {:stack-types [:vector_integer :integer]}))
+(define-registered vector_float_yank (with-meta (yanker :vector_float) {:stack-types [:vector_float :integer]}))
+(define-registered vector_boolean_yank (with-meta (yanker :vector_boolean) {:stack-types [:vector_boolean :integer]}))
+(define-registered vector_string_yank (with-meta (yanker :vector_string) {:stack-types [:vector_string :integer]}))
+
+(define-registered vector_integer_yankdup (with-meta (yankduper :vector_integer) {:stack-types [:vector_integer :integer]}))
+(define-registered vector_float_yankdup (with-meta (yankduper :vector_float) {:stack-types [:vector_float :integer]}))
+(define-registered vector_boolean_yankdup (with-meta (yankduper :vector_boolean) {:stack-types [:vector_boolean :integer]}))
+(define-registered vector_string_yankdup (with-meta (yankduper :vector_string) {:stack-types [:vector_string :integer]}))
+
+(define-registered vector_integer_shove (with-meta (shover :vector_integer) {:stack-types [:vector_integer :integer]}))
+(define-registered vector_float_shove (with-meta (shover :vector_float) {:stack-types [:vector_float :integer]}))
+(define-registered vector_boolean_shove (with-meta (shover :vector_boolean) {:stack-types [:vector_boolean :integer]}))
+(define-registered vector_string_shove (with-meta (shover :vector_string) {:stack-types [:vector_string :integer]}))
+
+(define-registered vector_integer_empty (with-meta (emptyer :vector_integer) {:stack-types [:vector_integer :boolean]}))
+(define-registered vector_float_empty (with-meta (emptyer :vector_float) {:stack-types [:vector_float :boolean]}))
+(define-registered vector_boolean_empty (with-meta (emptyer :vector_boolean) {:stack-types [:vector_boolean :boolean]}))
+(define-registered vector_string_empty (with-meta (emptyer :vector_string) {:stack-types [:vector_string :boolean]}))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; common instructions for vectors

                   type
                   (pop-item lit-type (pop-item type state)))))))

(define-registered vector_integer_remove (removeer :vector_integer :integer))
(define-registered vector_float_remove (removeer :vector_float :float))
(define-registered vector_boolean_remove (removeer :vector_boolean :boolean))
(define-registered vector_string_remove (removeer :vector_string :string))

                 (pop-item type state))
      state)))

(define-registered vector_integer_reverse (with-meta (reverser :vector_integer) {:stack-types [:vector_integer]}))
(define-registered vector_float_reverse (with-meta (reverser :vector_float) {:stack-types [:vector_float]}))
(define-registered vector_boolean_reverse (with-meta (reverser :vector_boolean) {:stack-types [:vector_boolean]}))
(define-registered vector_string_reverse (with-meta (reverser :vector_string) {:stack-types [:vector_string]}))

(defn pushaller
  "Returns a function that takes a state and pushes every item from the first
