Seperate function definitions in window and glob

Initial definitions of functions for window and glob, compiles but
results in unintended behavior. Hella needs a fix, very hacky.

Signed-off-by: Alberto Corona <albcoron@gmail.com>